Ext.define('DragonApp.view.level.ChartController', {
    extend: 'Ext.app.ViewController',

    alias: 'controller.level-chart',

    requires: [

    ],
    /**
     * [onToggleClick description]
     * @DateTime 2018-01-09
     * @param    {[type]} button [description]
     * @param    {[type]} e [description]
     * @param    {[type]} options [description]
     * @return   {[type]}
     */
    onToggleClick: function(container, button, pressed) {

        var bar_type;

        if (pressed) {
            switch (button.text) {
                case '等级人数':
                    bar_type = 'total';
                    break;
                case '活跃人数(7日)':
                    bar_type = 'active';
                    break;
                case '等级流失率':
                    bar_type = 'rate';
                    break;
            }
        }
        //this.loadStore(bar_type);
    },
    /**
     * 数据标签渲染
     * @DateTime 2018-01-10
     * @param    {int} v 数据值
     * @return   {int}   渲染
     */
    onSeriesLabelRender: function(v) {
        //return Ext.util.Format.number(v / 1000, '0,000');
        return v;
    }
});